import grails.test.GrailsUnitTestCase;
import Contas.Administrador;

class AdministradorTestes extends GrailsUnitTestCase{
	
	private def administrador
	
	protected void setUp() {
		super.setUp()
		administrador = new Administrador(username:'natexcientista', userRealName:'Nat�', passwd:'123456', email:'natexcientista@gmail.com', tipo:'Professor')
	}
	
	protected void tearDown() {
		super.tearDown()
		administrador = null
	}
	
	void testeAtributos (){
		assertEquals('natexcientista', administrador.getAt ('username'))
		assertEquals('Nat�', administrador.getAt ('userRealName'))
		assertEquals('123456', administrador.getAt ('passwd'))
		assertEquals('natexcientista@gmail.com', administrador.getAt ('email'))
		assertEquals('', administrador.getAt ('telefone'))
		assertEquals('', administrador.getAt ('description'))
                assertEquals('Professor', administrador.getAt ('tipo'))
		assert administrador.getAt('enabled')
	}
}
